<template><el-container class="main">
        <el-main>
          <div style="width: 480px; margin: 0 auto">
            <h2>登录</h2>
            <el-form :model="form">
              <!-- 文本输入框 -->
              <el-form-item label="用户名：">
                <el-input v-model="form.username"></el-input>
              </el-form-item>
              <!-- 密码输入框 -->
              <el-form-item label="密码：">
                <el-input type="password" v-model="form.password"></el-input>
              </el-form-item>
              <!-- 登录按钮 -->
              <el-form-item>
                <el-button type="primary" @click="login">登录</el-button>
              </el-form-item>
            </el-form>
          </div>
        </el-main>
      </el-container>
      </template>
      
   <script setup>
           const form= {
              username: "",
              password: "",
            };
           const dialogVisible= false
       
         const login=()=> {
            this.dialogVisible = true;
            console.log("用户信息:", this.form);
      };
      Vue.createApp(App).use(ElementPlus).mount("#app");
    </script>
  
